//
//  JKAreaCollectionViewCell.m
//  CIO领域demo
//
//  Created by 王冲 on 2017/11/14.
//  Copyright © 2017年 希爱欧科技有限公司. All rights reserved.
//

#import "JKAreaCollectionViewCell.h"

@implementation JKAreaCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    
    if (self) {
        
        [self layout];
    }
    
    return self;
}

-(void)layout{
    
    _areaImageView = [[UIImageView alloc]init];
    _areaImageView.backgroundColor = [UIColor whiteColor];
    //_areaImageView.image = [UIImage imageNamed:@"sg"];
    [self.contentView addSubview:_areaImageView];
    
    _areaImageView.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 0)
    .widthIs(COLLECTIONVIEW_WIDTH- 20)
    .heightIs((COLLECTIONVIEW_WIDTH/4)*3);
    
    
    _areaName = [[UILabel alloc]init];
    _areaName.backgroundColor = [UIColor whiteColor];
    _areaName.font = FONT_TWELVE;
    _areaName.textColor = COLOR_DIV;
    _areaName.adjustsFontSizeToFitWidth = YES;
    _areaName.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:_areaName];
    
    _areaName.sd_layout
    .leftSpaceToView(self.contentView, 0)
    .topSpaceToView(self.areaImageView, 0)
    .widthIs((SCREEN_WIDTH-89-9-2)/3.0)
    .heightIs(40);
}

@end

